<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::post('/user/{id}',[\App\Http\Controllers\UserController::class,'getUser']);
//寻宠消息
Route::get('/findPetList',[\App\Http\Controllers\FindPetController::class,'getFindPetList']);
Route::get('/findPetDetail',[\App\Http\Controllers\FindPetController::class,'getFindPetDetail']);
Route::post('/addComment',[\App\Http\Controllers\FindPetController::class,'addComment']);
Route::get('/getComment',[\App\Http\Controllers\FindPetController::class,'getComment']);

//上传图片
Route::any('/uploadImg',[\App\Http\Controllers\FindPetController::class,'upload']);
Route::any('/addFindPet',[\App\Http\Controllers\FindPetController::class,'addFindPet']);

//微信登录
Route::any('/wechatLogin',[\App\Http\Controllers\LoginController::class,'wechatLogin']);
Route::any('/composer',[\App\Http\Controllers\LoginController::class,'getOpenId']);



